<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>员工管理</title>
<!-- 导入jquery核心类库 -->
  <script type="text/javascript"
	src="${pageContext.request.contextPath }/js/jquery.1.11.1.min.js"></script> 
<%@include file="../include/jqueryeasyui.jsp"%>
	<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery.dragsort-0.5.2.min.js"></script>
	
	<style type="text/css">
	
			
			
		ul { margin:0px; padding:0px; margin-left:20px; }
		/* #list1, #list2 { width:100px; list-style-type:none; margin:0px; }
		#list1 li, #list2 li { float:left; padding:5px; width:100px; height:20px; }
		#list1 div, #list2 div { width:90px; height:20px; border:solid 1px black; background-color:#E0E0E0; text-align:center; padding:center; }
		 */
		 #list1  { width:400px; list-style-type:none; margin:0px; }
		  #list2 { width:300px; list-style-type:none; margin:0px; }
 		#list1 li, #list2 li { float:left; padding:5px; width:70px; height:20px; }
		#list1 div, #list2 div { width:70px; height:20px; border:solid 1px black; background-color:#E0E0E0; text-align:center; padding:center; }
		 
		 #list2 { float:right; }
		.placeHolder div { background-color:white !important; border:dashed 1px gray !important; }
		
	</style>
	<script>
	
	$(function(){
		main()
	});
	
	function main(){
		window.pcode = GetQueryString('pcode') ;
		initDragSort();
		initTypeCPIDSerialComboBox();
		initDatagrid();
		initBtn();
		initClothesSize();
		downloadClothesSizeList()
	}
	
	
	function initClothesSize(){
		
		$('#clothesWindow').window({
 	        width: 450,
	        modal: true,
	        shadow: true,
	        closed: true,
	        height: 500,
	        resizable:false
	        
	    });
		
	}
	
function downloadClothesSizeList(){
		
		
		$.post("${pageContext.request.contextPath}/hodo_clothes_size/page.listAll.ashx",   function(data){
			if(data.length>0){		 
				for (var i = 0; i < data.length; i++) {
					$('#clothes_td').append('<label>'+'<input name="clothesSizeID" type="radio" value='+data[i].csID +'>'+data[i].csName +'</label><br/><br/>');
				}				
			} 
  		});
	}
	
	function initTypeCPIDSerialComboBox(){
		$('#typeCPIDSerial').combobox({
			onSelect: function(param){
				 $('#hetonghao').text(param.cPIDSerial);
			}
		});
	}

	function GetQueryString(name)
	{
	     var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
	     var r = window.location.search.substr(1).match(reg);
	     if(r!=null)return  unescape(r[2]); return null;
	}
	
	 function initDragSort(){
		 
		 $("#list1, #list2").dragsort({ dragSelector: "div", dragBetween: true, dragEnd: saveOrder, placeHolderTemplate: "<li class='placeHolder'><div></div></li>" });
	/* 	//发送网络请求
		 $.get("${pageContext.request.contextPath}/page.celiangbuweiListAll.ashx", function(result){
			 
			 var a ="";
			 for(var i = 0;i<result.length;i++){
				 
					
				$('#list1').append("<li><div name='body_item' id="+result[i].itemID+">"+result[i].itemName+"</div></li>");
			 }
			 
				$("#list1, #list2").dragsort({ dragSelector: "div", dragBetween: true, dragEnd: saveOrder, placeHolderTemplate: "<li class='placeHolder'><div></div></li>" });
			   
			 
		 
		 });  */
	}
	

	function saveOrder() {
		var data = $("#list1 li").map(function() { return $(this).children().html(); }).get();
		$("input[name=list1SortOrder]").val(data.join("|"));
	};
		
	</script>

<script type="text/javascript">




	function doAdd(){
		$('#typeCPIDSerial').combobox('clear');
		$('#typeSizeRuleID').combobox('select', '-1');
		$('#typeName').val('');
		$('#typeID').val('-1');
		$('#typeHxgsTag').val('-1');
		$("tr[id^='tr_hxgs']").hide();
		
		$('#list2').children().remove();  
		$('#list1').children().remove();  
		
		//发送网络请求
		 $.get("${pageContext.request.contextPath}/page.celiangbuweiListAll.ashx", function(result){
			 for(var i = 0;i<result.length;i++){		
				$('#list1').append("<li><div name='body_item' id="+result[i].itemID+">"+result[i].itemName+"</div></li>");
			 }
		 });
		$('#pinleiWindow').window("open").window('setTitle', '品类管理');
		if(window.pcode!=null){
			$('#typeCPIDSerial').combobox('select', window.pcode);			
		}
		
		
	}
	
	
	 //增加查询参数，重新加载表格  
    function reloadgrid() {  
  
        //查询参数直接添加在queryParams中      
        var queryParams = $('#grid').datagrid('options').queryParams;  
        queryParams.typeName = $('#searchcontent').val();  
        
        $('#grid').datagrid('options').queryParams = queryParams;  
        $("#grid").datagrid('load');  
    }  
	 
	function doSearch(){
		reloadgrid();
	}
	
	function doEdit(){
		var rowData = $('#grid').datagrid('getSelected');  
        
        if (rowData == null) {  
            $.messager.alert("提示", "请选择要修改的行！", "info");  
        } else{
			$("#typeName").val(rowData.typeName);
			$("#typeID").val(rowData.typeID);
			
			$('#typeCPIDSerial').combobox('setValue', rowData.typeCPIDSerial);
			$("#quantity").val(rowData.quantity);
			$('#component').combobox('setValue', rowData.component);
			$('#typeHxgsTag').val(rowData.typeHxgsTag);
			$('#typeSizeRuleID').combobox('setValue', rowData.typeSizeRuleID);
			
			showHxgsDetail();
			
			if(rowData.typeHxgsTag=='0'){
				//145,200,5,170;60,200,2,120;A,F,,B
				var a = rowData.typeHXGS;
				a = a.substring(2,a.length);
				var b = a.split(';');
				
				
				for (var i = 0; i < b.length; i++) {
					var column = b[i].toString().split(',');
					 for (var int2 = 0; int2 < column.length; int2++) {
						 $('#hxgs'+(i+1).toString()+(int2+1).toString()).val(column[int2]);
					}
				}
				
				
				 
				
			}else if(rowData.typeHxgsTag=='1'){
				
				//30,60,2,50;
				var a = (rowData.typeHXGS).substring(2,rowData.typeHXGS.length);
				var b = a.split(',');
				for (var  = 0; i < b.length; i++) {
					var c = b[i];
					
					$('#hxgs4'+(i+1).toString()).val(c);
				}
			}
			
			$('#list2').children().remove();  
			$('#list1').children().remove();  
			//dragsort 回显
			$.get("${pageContext.request.contextPath}/page.everyone.celiangbuweiListByIds.ashx?ids="+rowData.typeItemsStr, function(result){
				 
				 for(var i = 0;i<result.length;i++){
						
					$('#list2').append("<li><div name='body_item' id="+result[i].itemID+">"+result[i].itemName+"</div></li>");
					
				 }
			 
				
		 
		 }); 
			$.get("${pageContext.request.contextPath}/page.everyone.otherCeliangbuweiByIds.ashx?ids="+rowData.typeItemsStr, function(result){
				 
				 for(var i = 0;i<result.length;i++){
						
					$('#list1').append("<li><div name='body_item' id="+result[i].itemID+">"+result[i].itemName+"</div></li>");
					
				 }
			 
				
		 
		 }); 
			
			
			
			// 弹出窗口
			  
			$("#pinleiWindow").window('open').window('setTitle', '修改品类');
        } 
	}

	
	var columns = [ [ {
		field : 'typeCategory',
		title : '品类类型',
		width : 80,
		
		formatter:formatterCategory
	},{
		field : 'view_Contractname',
		title : '项目名称',
		width : 100,	
	},{
		field : 'typeName',
		title : '品类名称',
		width : 100,	
	},{
		field : 'component',
		title : '上衣/下衣',
		width : 100,
		formatter:formatterComponent
	},{
		field : 'quantity',
		title : '每人件数',
		width : 100,	
	}, {
		field : 'typeItemsName',
		title : '测量部位',
		width : 400,
	}, {
		field : 'view_thgz',
		title : '套号规则',
		width : 200,
		formatter:formatterTaohaoGuize
	}, {
		field : 'typeHxgsTag',
		title : '号型格式',
		width : 200,
		formatter:formatterHxgs
	},{
		field : 'v_csName',
		title : '关联成衣规格',
		width : 200,
		 
	},  {
		field : 'typeID',
		title : '操作',
		width : 100,
		formatter:formatterCaoZuo
	} ] ];
	
	function formatterCaoZuo(value,row,index){

			return "<a onclick=doDel("+index+") href=#>删除</a>";
	}
	
	function formatterComponent(value,row,index){
		if(value=='jacket'){
			return "上衣";
		}else if(value=='pants'){
			return "下衣";
		}
	}
	
	function formatterCategory(value,row,index){
		if(value==1){
			return "专属品类";
		}else if(value==0){
			return "常用品类";
		}

		
	}
	
	
	function formatterHxgs(value,row,index){
		
		if(value=="0"){
			return "170/100B";
		}else if(value=="1"){
			return "41";
		}else{
			return "无"
		}

		
}	
	
	function formatterTaohaoGuize(value,row,index){
		if(value){
			return value;
		} else{
			return "无";
		}
	}	

	
	
	function doDel(index){
	    $('#grid').datagrid('selectRow',index);// 关键在这里  
	    var row = $('#grid').datagrid('getSelected'); 
	    if(row){ 

		     $.messager.confirm("操作提示", "确认删除 当前记录？", function (data) {  
		            if (data) {  
		            	$.post("${pageContext.request.contextPath}/clothesType/page.del.ashx?typeID="+row.typeID,function(data){
			    			
			    			if(data.status == "1"){
			    				// 成功
			    				$.messager.alert('消息','操作成功 ','info');
			    				reloadgrid();
			    				
			    			
			    			}else{
			    					$.messager.alert('消息','<br>操作失败','info');			    				
			    			}			    				
			    		}); 
		            }  
		            else {  
		                 
		            }  
		        }); 


		}
	}
	function doProcess(index){
	    $('#grid').datagrid('selectRow',index);// 关键在这里  
	    var row = $('#grid').datagrid('getSelected'); 
	    if(row){ 
/* 	    	alert(row.bfId)
 */			location.href="${pageContext.request.contextPath}/page.bfdetails.ashx?bfid="+row.bfid;

		}
	}
	
	function formatterDate(value,row,index){
		if(value==''||null==value){
			return '';
		}
		var now = new Date(value);  
		var year=now.getYear()+1900; 
		var month=now.getMonth()+1; 
		var date=now.getDate(); 
		var hour=now.getHours(); 
		var minute=now.getMinutes();
		minute= (minute > 9) ? minute=minute : minute='0'+minute;
		//var second=now.getSeconds(); 
		return year+"-"+month+"-"+date+" "+hour+":"+minute; 
	}
	
	 function formaterbfIsDone(value,row,index){
		if(value==false){
			return "否";
		}else{
			return "是";
		}
	} 
	


	


	 function initBtn(){
		$('#add').click(doAdd);
 		$('#edit').click(doEdit);
 		$('#search').click(doSearch);
 		$('#relatedClothes').click(doRelateClothes);

	} 
	 
		function doRelateClothes(){
			
			var rowData = $('#grid').datagrid('getSelected');  
	        
	        if (rowData == null) {  
	            $.messager.alert("提示", "请选择要修改的品类！", "info");  
	        } else{
				$("#clothesFormTypeID").val(rowData.typeID);
		 
	 			$('#clothesWindow').window("open").window('setTitle', '关联成衣规格');
			 
	        }
			
		}
	function initDatagrid(){
		// 先将body隐藏，再显示，不会出现页面刷新效果
		$("body").css({visibility:"visible"});
		
	
		// 收派标准数据表格
		$('#grid').datagrid( {
			iconCls : 'icon-forward',
			fit : true,
			border : false,
			rownumbers : true,
			singleSelect:true,
			striped : true,
			toolbar : '#tb',
			url : "${pageContext.request.contextPath}/clothesType/page.list.ashx",
			queryParams: window.pcode!=null?{ 'typeCPIDSerial': window.pcode,'typeCategory':1}:{'typeCategory':1},
			idField : 'bfId',
			columns : columns,
			pageList: [1,10,20,30],
			pagination:true,
			view:myview,
			emptyMsg:"<font size=5>暂无记录</font>"
			
		});
		
		//初始化员工窗口
		$('#pinleiWindow').window({
			
            title: '品类管理',
            width: 1000,
            modal: true,
            shadow: true,
            closed: true,
            height: 700,
            resizable:true,
            closable:true
            
        });
	
		
		
		//提交表单
		$('#saveClothes').click(function(){
			
		 
		
				// 校验
				if($('#clothesForm').form('validate')){
					// 1 、获得form 数据
					var params = $('#clothesForm').serialize();
					// 2、将数据发送给服务器 
					$.post("${pageContext.request.contextPath}/clothesType/page.relateClothes.ashx", params , function(data){
						if(data == "success"){
							// 成功
							$.messager.alert('消息','操作成功 ','info');
							// 关闭窗口
							$('#clothesWindow').window('close');
							// 清除表单数据
							$('#clothesWindow').form('clear');
 							
							// 刷新表格数据 
							$('#grid').datagrid('reload');
						 
						}else{
							data =new String(data);
							if(data.charAt(0)=='<'){
								$.messager.alert('消息','没有权限 ','info');
							}else{
								$.messager.alert('消息','操作失败 ','info');
							}
							
						}
							
					});
				}
				
			});	
		
		//提交表单
		$('#save').click(function(){
			
			var select = $('#typeCPIDSerial').combobox('panel').find('.combobox-item-selected') 
			if(select.length==0){
				$.messager.alert('消息','请在下拉框中选取项目！','info');
				$('#typeCPIDSerial').combobox('clear');
				return;
			}
			
			var options=$("#typeHxgsTag option:selected");  //获取选中的项
			var selected_value = options.val() ;   //拿到选中项的值
			
			if(selected_value == '-1'){
							
			/* 	$.messager.alert("提示", "请选择号型格式！", "info");
				return; */
			}
			
			var itemsValue = "";

			if(selected_value == '0'){
				 
				var items1 = $("input[id^='hxgs1']");
				var items2 = $("input[id^='hxgs2']");
				var items3 = $("input[id^='hxgs3']");
				
				var items1Value = "";
				var items2Value = "";
				var items3Value = "";
				for (var i = 0; i < items1.length; i++) {
					items1Value += $(items1[i]).val()+",";
					
				}
				for (var i = 0; i < items2.length; i++) {
					
					items2Value += $(items2[i]).val()+",";
					
				}
				for (var i = 0; i < items3.length; i++) {
					items3Value += $(items3[i]).val()+",";
					
				}
				
				
				
		
				
				itemsValue = items1Value+";"+items2Value+";"+items3Value;
				
				itemsValue =  "0;"+itemsValue.substring(0, itemsValue.length-1).replace(/,;/g, ";");
				
				
							
			}
			 
			if(selected_value == '1'){
				var items4 = $("input[id^='hxgs4']");
				var items4Value = "";
				for (var i = 0; i < items4.length; i++) {
					items4Value += $(items4[i]).val()+",";
					
				}
				
				itemsValue = "1;"+items4Value.substring(0, items4Value.length-1);
				
				
			}
			
			
							
			var data = $("#list2 li").map(function() { return $(this).children().html(); }).get();
			var data2 = $("#list2 li").map(function() { return $(this).children().attr('id'); }).get();
			
			
			if(data.length==0){
				$.messager.alert('消息','请选择测量部位 ','info');
				return;
			}			
			// 校验
				if($('#sform').form('validate')){
					
				 
					var celiangbuwei = '&typeItemsStr='+data2;
					var celiangbuweiName = '&typeItemsName='+data;
					var hxgsvalue = '&typeHXGS='+itemsValue;
					
					 
					
					// 1 、获得form 数据
					var params = $('#sform').serialize()+celiangbuwei+celiangbuweiName+hxgsvalue;
					
					
					// 2、将数据发送给服务器 
					$.post("${pageContext.request.contextPath}/clothesType/page.saveOrUpdate.ashx", params , function(data){
						if(data == "success"){
							// 成功
							$.messager.alert('消息','操作成功 ','info');
							// 关闭窗口
							$('#pinleiWindow').window('close');
							// 清除表单数据
							/*   $('#pinleiWindow').form('clear');
							$('#pinleiWindow *').trigger('blur');// 离焦  */
							
							// 刷新表格数据 
							$('#grid').datagrid('reload');
						}else if(data.split('_')[0]=="fail"){
							
							$.messager.alert('消息',data.split('_')[1]+'测量部位重复了。','info');
						}else if(data=="nameconflict"){
							
							$.messager.alert('消息','当前项目下品类名称重复。','info');
						}else if(data=="onlyone"){
							$.messager.alert('消息','每个项目下只能有一个品类。','info');
						}
						else{
							$.messager.alert('消息','操作失败 ','info');
						}
							
					});
				}
				
			});	
		
		
	} 
	
	
	
	var myview = $.extend({},$.fn.datagrid.defaults.view,{
		onAfterRender:function(target){
			$.fn.datagrid.defaults.view.onAfterRender.call(this,target);
			var opts = $(target).datagrid('options');
			var vc = $(target).datagrid('getPanel').children('div.datagrid-view');
			vc.children('div.datagrid-empty').remove();
			if (!$(target).datagrid('getRows').length){
				var d = $('<div class="datagrid-empty"></div>').html(opts.emptyMsg || 'no records').appendTo(vc);
				d.css({
					position:'absolute',
					left:0,
					top:50,
					width:'100%',
					textAlign:'center'
				});
			}
		}
	});

	
	function showHxgsDetail(){
		
		
		var options=$("#typeHxgsTag option:selected");  //获取选中的项
		var selected_value = options.val() ;   //拿到选中项的值
		
		if(selected_value == '-1'){
		
			$("tr[id^='tr_hxgs']").hide();
			
			/* $.messager.alert("提示", "请选择号型格式！", "info");*/
			return; 
		}
		

		if(selected_value == '0'){
			
		
			$("tr[id^='tr_hxgs_1']").show();
			$("tr[id^='tr_hxgs_2']").hide();
		
			return;
		}
		
		if(selected_value == '1'){

			$("tr[id^='tr_hxgs_1']").hide();
			$("tr[id^='tr_hxgs_2']").show();
			
			return;
		}
		
	}	
	
	 
	
</script>	
</head>
<body class="easyui-layout" >
	<div region="center">
	
		<table id="grid">
		
		</table>
	</div>
	
	<div class="easyui-window"  id="pinleiWindow" collapsible="false" minimizable="false" maximizable="false" style="top:50px;left:200px">
		<div region="north" style="height:31px;overflow:hidden;" split="false" border="false" >
			<div class="datagrid-toolbar">
				<a id="save" icon="icon-save" href="#" class="easyui-linkbutton" plain="true" >保存</a>
			</div>
		</div>
		<div region="center" style="overflow:auto;padding:5px;" border="false">
			<form id="sform">
				<table class="table-edit" width="90%" align="center">
					<tr class="title">
						<td colspan="8">基本信息</td>
					</tr>
					
					<tr>
				
						<td>品类类型</td>
						<td colspan="3">专属品类</td>
 						 
				 
				
						<td>所属项目</td>
						<td colspan="2">
						<input class="easyui-combobox"     
									required="true"
									name="typeCPIDSerial"
									id="typeCPIDSerial"
 									data-options="
 									filter: function(q, row){  
													        var opts = $(this).combobox('options');  
													        return row[opts.textField].indexOf(q) >= 0;//这里改成>=即可在任意地方匹配  
													    },
											url:'${pageContext.request.contextPath}/contract/page.list_all.ashx?refreshcache=new Date().getTime()',
											method:'post',
											valueField:'cPIDSerial',
											textField:'cPName',
											panelHeight:'300',
											panelWidth:'300'
						"></td>
						<td id="hetonghao"></td> 
						 
							<input type="hidden" id="typeCategory" name="typeCategory" value="1">
 						<input type="hidden" id="typeID" name="typeID" value="-1">
					</tr>
				
					

					
					<tr>
						<td >品类名称</td>
						<td colspan="3"><input id="typeName" name="typeName" type="text" class="easyui-validatebox"  required="true"  /></td>
					 
						<td >件/人</td>
						<td colspan="3"><input id="quantity" name="quantity" type="text" class="easyui-validatebox"  required="true" value="1" /></td>
					</tr>
					
				  	<tr>
						<td >上衣/下衣</td>
						
						<td colspan="3">
							<select  class="easyui-combobox  "  required="true"  name="component" id="component" style="width:172px;">
								   <option></option>
								   <option value ="jacket">上衣</option>
								  <option value="pants">下衣</option>
							</select> 
							
							
						</td>
					 
						<td >套号规则</td>
 						<td colspan="3">
						<input class="easyui-combobox"    
 									name="typeSizeRuleID"
									id="typeSizeRuleID"
									data-options="
											url:'${pageContext.request.contextPath}/sizeRuler/page.list_all.ashx?refreshcache=new Date().getTime()',
											method:'post',
											valueField:'sizeRuleID',
											textField:'sRName',
											panelHeight:'300',
											panelWidth:'300'
						"></td>
						
						 
					</tr>
					
					<tr>
						<td >号型格式</td>
						
						<td colspan="3">
							<select name="typeHxgsTag" id="typeHxgsTag" onchange=showHxgsDetail()  >
								   <option value ="-1">无&nbsp;&nbsp;</option>
								   <option value ="0">170/100B</option>
								  <option value="1">41</option>
							</select> 
							
							
						</td>
					</tr>
					 
					<tr id="tr_hxgs_11" hidden="hidden"> 
					
						<td>值</td>
						<td>长度</td>
						<td>围度</td>
						<td>型</td>
					</tr>
					<tr id="tr_hxgs_12" hidden="hidden"> 
					
						<td>最小值</td>
						<td><input id="hxgs11" type="text"  value="145" style="width:60px"></td>
						<td><input id="hxgs21" type="text" value="60" style="width:60px"></td>
						<td><input id="hxgs31" type="text" value="A" style="width:60px"></td>
					</tr>
					<tr id="tr_hxgs_13" hidden="hidden"> 
					
						<td>最大值</td>
						<td><input id="hxgs12" type="text"  value="200" style="width:60px"></td>
						<td><input id="hxgs22" type="text"  value="200" style="width:60px"></td>
						<td><input id="hxgs32" type="text"  value="F" style="width:60px"></td>
					</tr>
					<tr id="tr_hxgs_14" hidden="hidden"> 
						<td> 档差</td>
						<td><input id="hxgs13" type="text"  value="5" style="width:60px"></td>
						<td><input id="hxgs23" type="text"  value="2" style="width:60px"></td>
						<td><input id="hxgs33" type="hidden"  value=""  ></td>
 					</tr>
				<tr id="tr_hxgs_15" hidden="hidden"> 
					
						<td>缺省值</td>
						<td><input id="hxgs14" type="text"  value="170" style="width:60px"></td>
						<td><input id="hxgs24" type="text"  value="120" style="width:60px"></td>
						<td><input id="hxgs34" type="text"  value="B" style="width:60px"></td>
					</tr>
					
					<tr id="tr_hxgs_21" hidden="hidden"> 
					
						<td colspan="2">型号</td>
						 
					</tr>
					<tr id="tr_hxgs_22" hidden="hidden"> 
					
						<td>最小值</td>
						<td><input id="hxgs41" type="text"  value="30" style="width:60px"></td>
						 
					</tr>
					<tr id="tr_hxgs_23" hidden="hidden"> 
					
						<td>最大值</td>
						<td><input id="hxgs42" type="text"  value="60" style="width:60px"></td>
						 
					</tr>
					<tr id="tr_hxgs_24" hidden="hidden"> 
					
						<td> 档差</td>
						<td><input id="hxgs43" type="text"  value="1" style="width:60px"></td>
						 
						 
					</tr>
					 <tr id="tr_hxgs_25" hidden="hidden"> 
					
						<td>缺省值</td>
						<td><input id="hxgs44" type="text"  value="50" style="width:60px"></td>
						 
					</tr>
					 
					
					
					
					<tr>
						<td colspan="4" align="center"></td>
					</tr> 
					<tr class="title">
						<td colspan="8">测量部位&lt;拖动测量部位到右侧使用&gt;</td>
					</tr>
					
				
					</table>
					<table class="table-edit" width="80%" align="center">
						<tr>
							 
					<td colspan="4">
									<ul id="list2">
										
									</ul>
	
					<input name="list1SortOrder" type="hidden" />
						 
								<ul id="list1">
									
								</ul>
							</td>
							</tr>
						</table>
	
			</form>
		</div>
	</div>


	
		<div id="tb" style="padding:5px;height:auto">
		<div style="margin-bottom:5px">
			<a href="#" id="add" class="easyui-linkbutton" iconCls="icon-add" plain="true" >增加</a>
  		<a href="#" id="edit" class="easyui-linkbutton" iconCls="icon-edit" plain="true" >编辑</a>
  		<a href="#" id="relatedClothes" class="easyui-linkbutton" iconCls="	icon-tip" plain="true" >关联成衣规格</a>
  
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;品类名称:&nbsp;&nbsp;&nbsp;&nbsp;<input id="searchcontent" class="easyui-textbox" style="width:80px"/>
			&nbsp;&nbsp;&nbsp;&nbsp;<a href="#"  id="search" class="easyui-linkbutton" iconCls="icon-search">搜索</a>
		
		</div>
	</div>
	
		<div class="easyui-window"  id="clothesWindow" collapsible="false" minimizable="false" maximizable="false"  style="top:50px;left:200px">
		<div region="north" style="height:31px;overflow:hidden;" split="false" border="false" >
			<div class="datagrid-toolbar">
				<a id="saveClothes" icon="icon-save" href="#" class="easyui-linkbutton" plain="true" >保存</a>
			</div>
		</div>
		<div region="center" style="overflow:auto;padding:5px;" border="false">
			<form id="clothesForm">
				<table class="table-edit" width="90%" align="center">
					<tr id="public_pinlei_tr">
						<td>关联成衣规格  <input id="clothesFormTypeID" type="hidden" name="typeID"/></td>
						<td id="clothes_td">	
								 
							 
						</td>
					</tr>
				 
		 
					
				
				</table>
				 
			</form>
		</div>
	</div>

	
</body>
</html>